<?php
class helper_partial extends system_view_helper_abstract {
	public function partial($name, array $data = array()) {
		$view = $this->cloneView();
		$view->assign($data);
		return $view->render($name);
	}
	
	protected function cloneView() {
		$view = clone $this->view;
		$view->clearVars();
		return $view;
	}
}